﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.IO;
using System.Windows.Forms;
using System.Configuration;

namespace QuantumFractals
{
    public partial class SettingsForm : Form
    {
        public SettingsForm()
        {
            InitializeComponent();
        }

        private void btnDefaults_Click(object sender, EventArgs e)
        {
            numResolutionPixels.Value = 2000;
            numResolutionBalls.Value = 100;
            numTime.Value = 10000000;
            comCsvSeparator.ValueMember = ";";
            comCsvCultureName.ValueMember = "";
            txtFractalsDirectory.Text = "";
        }

        private void btnSetDirectory_Click(object sender, EventArgs e)
        {
            if (txtFractalsDirectory.Text == "")
                folderBrowserDialog.SelectedPath = Path.GetDirectoryName(Application.ExecutablePath) +
                    @"\Fractals";
            else
                folderBrowserDialog.SelectedPath = txtFractalsDirectory.Text;
            if (folderBrowserDialog.ShowDialog() == DialogResult.OK)
                txtFractalsDirectory.Text = folderBrowserDialog.SelectedPath;
        }
    }
}